# Hash.pl - Hashes in Perl

#!/usr/bin/perl

use strict;
use warnings;

# data member declaration
my %things = ("Sourav", 12, "Isha", 14);
my ($key,
	$value);
# my $key_h = "fname";

print "\nHash.pl\n";
print "--------\n";
	
while(($key, $value) = each(%things)) {
	print "Key: $key\n";
	print "Value: $things{$key}\n\n";
}

my %advt = {
	fname => "Fred",
	lname => "Flintstone",
	"yabba dabba" => "Velma",
	};

while(($key, $value) = each(%advt)) {
	print "Key: $key\n";
	print "Value: $advt{$key}\n\n";
}